s[100000];
main(n,i,j,a,b,x,y)
{
	unsigned long m=-1;
	for(gets(s),n=0;~scanf("%d",&s[n++]););
	
	for(j=0;j<n-1;j++)
		for(i=j+1;i<n-1;i++)
		{
			x=s[i]>s[j]?s[i]:s[j];
			y=s[i]<s[j]?s[i]:s[j];
			if(abs(x+y)<m)
			{
				m=abs(x+y);
				a=y;b=x;
			}
		}

	printf("%d %d",a,b);
}
